//
//  XYPlayerView.h
//  PreviewStudyManage
//
//  Created by 吴桑 on 2017/8/10.
//  Copyright © 2017年 lange. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol XYPlayerViewDelegate <NSObject>
@optional

/** 横竖屏 */
- (void)XYPlayerViewDelegateWithIsFull:(BOOL)isFull;
/** 返回 */
- (void)XYPlayerViewDelegateBack;

@end



@interface XYPlayerView : UIView

//必传
/** 控制器 */
@property (nonatomic, weak) UIViewController *ownController;
/** 视频地址 */
@property (nonatomic,copy) NSString *url;
/** 距顶部高度 */
@property (nonatomic, assign) NSInteger topSpace;
/** 播放器高度 */
@property (nonatomic, assign) NSInteger playerHeight;


//根据需要传值
/** 视频名称 */
@property (nonatomic,copy) NSString *resName;
/** 字幕地址 */
@property (nonatomic,copy) NSString *subTitlePath;


/** ContentViewDelegte */
@property (nonatomic, weak) id<XYPlayerViewDelegate> delegate;


//外调方法
- (void)destroyPlayer;//销毁
- (void)pauseXYVideo;//暂停播放
- (void)replyXYVideo;//恢复播放

- (CGFloat)getTotalVideoTime;//获取视频总时长


@end
